import Cars.Factory;
import Cars.Car;

import java.util.ArrayList;
import java.util.List;


public class Main {
    public static void main(String[] args) {


        List<Car> carList = new ArrayList<Car>();

        carList.add(Factory.getCarInstanceByType("SUV"));
        carList.add(Factory.getCarInstanceByType("轿车"));
        carList.add(Factory.getCarInstanceByType("跑车"));
        carList.add(Factory.getCarInstanceByType("轿车"));


        for (Car currentCar : carList){
            System.out.println(currentCar.showName());
        }


    }


    }
